namespace WCFThree.Entity
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;
    using System.Runtime.Serialization;
    [Table("course")]
    [DataContract(IsReference = true)]
    public partial class course
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public course()
        {
            scores = new HashSet<score>();
        }

        [Key]
        [StringLength(5)]
        public string cno { get; set; }

        [Required]
        [StringLength(100)]
        public string cname { get; set; }

        [Required]
        [StringLength(3)]
        public string tno { get; set; }

        public virtual teacher teacher { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<score> scores { get; set; }
    }
}
